<%-- 
    Document   : popuptemplate
    Created on : Jun 4, 2012, 2:47:19 PM
    Author     : ems
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>
<%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="../css/popup.css"/> 
        <link rel="stylesheet" type="text/css" href="../css/kapiform.css"/> 
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/jq.date.js"></script>  
        <link rel="stylesheet" type="text/css" href="../css/ui.datepicker.css"/>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/kapi.js"></script>


        <script type="text/javascript" language="javascript">
            var open_cur = 0;
            $j = jQuery.noConflict();
            $j(document).ready(function(){
              
                var b = location.pathname;
                $j("input[id$='message']").val(b);
                validateform("job");
                $j('input#leavedate1,input#leavedate2').datepicker({ dateFormat: 'dd/mm/yy', showOn: 'button', buttonImage: '../images/calenda_icon.gif', buttonImageOnly: true }); 
                $j(".abc").live("change",function(){
                    var obj1 = $j(this).children("option:selected").val();
                    if(obj1 != null)
                    {
                        $j.post("actionDebt.jsp?action=cn&id="+obj1);
                    }
                });
            });
        </script>
        <style type="text/css">
            .ui-datepicker-trigger{
                margin-top: 2px !important;
            }
            #ui-datepicker-div
            {
                z-index: 9999999;
            }
            .number{
                text-align: right;
            }
            .stardates{
                float:left;
                width:281px;
                margin-left:11px;
            }
            .stardates label{
                float:left;
                width:92px;
                text-align: right;
                margin-top:4px;
            }
            .stardates input[type="text"] {
                width:100px ;
                float:left;
                margin-left: 4px;
                margin-right: 4px;
            }
            .enddates input[type="text"] {
                width:100px;
                float:left;
                margin-left:0px;
                margin-right: 4px;
            }
            .enddates label{
                float:left;
                width:110px;
                text-align: right;
                margin-top:4px;
                margin-right: 4px;
            }
            .enddates{
                float:left;
            }
            .bg_job_left_right{
                background: #fff;
            }
            .field_blue{
                background: #fff !important;
            }
            .fields_input label{
                width: 105px !important;
            }
            .addjob_left_right{
                width:690px !important;
            }
            .rich-table-row {
                height: 25px;
            }
            .greyRow{
                background: #E0EFFC;
            }
            .cssContent{
                float:left;
                width: 96%;
                margin-left: 2%;
                margin-top: 10px;
            }
        </style>

    </head>


    <body style=" float:left; width:auto; height:auto; margin:0px;">
        <f:view>
            <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>
            <a4j:form id="job" >
                <div class="popup" style="height:350px; width:750px">
                    <div class="popup-header">
                        <div class="title"><h:outputText value="Tài liệu"/></div>
                    </div>
                    <div class="popup-content">
                        <div class="main_content">
                            <div class="cssContent">


                                <h:panelGroup rendered="#{T950Bean.tip==1}">
                                    <rich:dataTable value="#{T950Bean.listdocumentM650}" var="cus"
                                                    rows="8"
                                                    rowClasses="greyRow, whiteRow"
                                                    style=" "

                                                    width="600px" columnClasses=",columns,columns,columns" rowKeyVar="row"
                                                    id="table1" styleClass="machinePosDataTable">


                                        <rich:column style="width:20px;">
                                            <f:facet name="header">
                                                <h:outputText value="STT" />
                                            </f:facet>
                                            <div style="width:20px;text-align: center;">
                                                <h:outputText value="#{row+1}" />

                                            </div>
                                        </rich:column>


                                        <rich:column width="120px">
                                            <f:facet name="header">
                                                <h:outputText value="Thư mục" />
                                            </f:facet>

                                            <div style="width:120px; margin-left: 4px;">
                                                <h:outputText value="#{cus.fv001}" />
                                            </div>
                                        </rich:column>




                                        <rich:column  width="285px" >
                                            <f:facet name="header">
                                                <h:outputText value="Tên File" />
                                            </f:facet>

                                            <div style="width:285px;margin-left: 4px;">
                                                <h:outputLink     value="#{cus.download}"  target="_Bank" >
                                                    <h:outputText value="#{cus.mv652}" />
                                                </h:outputLink>
                                            </div>
                                        </rich:column>
                                        <rich:column  width="80px">
                                            <f:facet name="header">
                                                <h:outputText value="Ngày cập nhật" />
                                            </f:facet>

                                            <div style="width:80px;text-align: center">
                                                <h:outputText value="#{cus.ml668}" ><f:convertDateTime pattern="dd/MM/yyyy" /> </h:outputText>
                                            </div>
                                        </rich:column>
                                        <rich:column  width="180px">
                                            <f:facet name="header">
                                                <h:outputText value="Người cập nhật" />
                                            </f:facet>

                                            <div style="width:180px;margin-left: 4px;">
                                                <%--  <h:outputLink value="cuscompany.jsp?pnPK100=#{cus.fk100}&type=#{cus.kn114}"><h:outputText value="#{cus.ml669}" /></h:outputLink> --%>
                                                <h:outputText value="#{cus.ml669}" />
                                            </div>
                                        </rich:column>



                                        <f:facet name="footer">

                                            <rich:datascroller id="ds1" for="table1"></rich:datascroller> 
                                        </f:facet>
                                    </rich:dataTable>
                                </h:panelGroup>
                                <h:panelGroup rendered="#{T950Bean.tip==0}">
                                    <rich:dataTable value="#{T950Bean.listdocumentM650CN}" var="cus"
                                                    rows="8"
                                                    rowClasses="greyRow, whiteRow"
                                                    style=" "

                                                    width="600px" columnClasses=",columns,columns,columns" rowKeyVar="row"
                                                    id="table2" styleClass="machinePosDataTable">


                                        <rich:column style="width:20px;">
                                            <f:facet name="header">
                                                <h:outputText value="STT" />
                                            </f:facet>
                                            <div style="width:20px;text-align: center;">
                                                <h:outputText value="#{row+1}" />

                                            </div>
                                        </rich:column>


                                        <rich:column width="120px">
                                            <f:facet name="header">
                                                <h:outputText value="Thư mục" />
                                            </f:facet>

                                            <div style="width:120px;margin-left: 4px;">
                                                <h:outputText value="#{cus.fv001}" />
                                            </div>
                                        </rich:column>




                                        <rich:column  width="285px" >
                                            <f:facet name="header">
                                                <h:outputText value="Tên File" />
                                            </f:facet>

                                            <div style="width:285px;margin-left: 4px;">
                                                <h:outputLink     value="#{cus.download}"  target="_Bank" >
                                                    <h:outputText value="#{cus.mv652}" />
                                                </h:outputLink>
                                            </div>
                                        </rich:column>
                                        <rich:column  width="80px">
                                            <f:facet name="header">
                                                <h:outputText value="Ngày cập nhật" />
                                            </f:facet>

                                            <div style="width:80px;text-align: center">
                                                <h:outputText value="#{cus.ml668}" />
                                            </div>
                                        </rich:column>
                                        <rich:column  width="180px">
                                            <f:facet name="header">
                                                <h:outputText value="Người cập nhật" />
                                            </f:facet>

                                            <div style="width:180px;margin-left: 4px;">
                                                <%--  <h:outputLink value="cuscompany.jsp?pnPK100=#{cus.fk100}&type=#{cus.kn114}"><h:outputText value="#{cus.ml669}" /></h:outputLink> --%>
                                                <h:outputText value="#{cus.ml669}" ><f:convertDateTime pattern="dd/MM/yyyy" /> </h:outputText>
                                            </div>
                                        </rich:column>



                                        <f:facet name="footer">

                                            <rich:datascroller id="ds1" for="table2"></rich:datascroller> 
                                        </f:facet>
                                    </rich:dataTable>
                                </h:panelGroup>


                            </div>
                        </div>
                    </div>
                    <div class="popup-footer">
                        <div class="buttonsave" onclick="jQuery.fancybox.close() "  ><span><h:outputText value="#{locale.close}"/></span></div>
                    </div>
                </div>
            </a4j:form>
        </f:view>
    </body>
</html>
<script type="text/javascript">
    $j(document).ready(function(){
        yhight = ($j('.popup').height()-90)+"px" ;
        $j('.main_content').css('height',yhight );
        $j('.popup-content').css('height',yhight );
    });
</script>